﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Win32;
using System.IO;
using System.Collections.ObjectModel;
using System.Windows.Controls;
using HelloWPF.Command.Command;

namespace HelloWPF.Command.ViewModel
{
    public class TreeViewViewModel : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;
        private void OnPropertyChanged(string propertyName)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }

        #region 命令属性
        /// <summary>
        /// TreeView选中项改变命令
        /// </summary>
        public CommandBase TreeviewSelectedItemChangedCommand { get; set; }
        #endregion

        public TreeViewViewModel()
        {
            //TreeView选中项改变命令
            this.TreeviewSelectedItemChangedCommand = new CommandBase()
            {
                DoExecute = ControlGroupBoxVisibility,
                DoCanExecute = o => { return true; }
            };
        }

        /// <summary>
        /// 控制GroupBox显示/隐藏
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void ControlGroupBoxVisibility(object obj)
        {
            
        }
    }
}
